﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SanPham.ascx.cs" Inherits="Control_SanPham" %>
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>

<style type="text/css">
    .sanpham1
    {
        width: 600px;
    }
    .sanpham2
    {
        width: 100%;
    }
    .sanpham3
    {
        width: 200px;
        height: 23px;
    }
</style>

<table align="center" class="sanpham1">
    <tr>
        <td>
            <asp:DataList ID="DataList1" runat="server" RepeatColumns="3" Width="100%" 
                DataKeyField="MaSP" onitemcommand="DataList1_ItemCommand">
                <ItemTemplate>
                    <table class="sanpham2" width="180px">
                        <tr>
                            <td bgcolor="#0000CC" align="center">
                                <asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True" 
                                    Font-Size="Large" ForeColor="White" 
                                    NavigateUrl='<%# "~/TrangChu.aspx?MaSP="+Eval("MaSP") %>' 
                                    Text='<%# Eval("TenSP") %>'></asp:HyperLink>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" height="200px" width="190px">
                                <asp:Image ID="Image1" runat="server" Height="190px" 
                                    ImageUrl='<%# "~/Hinh/"+Eval("hinhSP") %>' Width="180px" />
                            </td>
                        </tr>
                        <tr>
                            <td align="center" style="width: 200px" width="100px">
                                <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Large" 
                                    ForeColor="Red" Text='<%# "Giá: "+Eval("GiaBanSP")+"VND" %>'></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="sanpham3" width="100px">
                                <asp:ImageButton ID="ImageButton1" ToolTip="Thêm Vào Giỏ Hàng" runat="server" 
                                    CommandName="ChonMua" ImageUrl="~/Hinh/giohang.png" 
                                    CommandArgument='<%# Eval("MaSP") %>' />
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="sanpham3" width="100px">
                                <asp:Label ID="Label2" runat="server" 
                                    Text='<%# "So Luong San Pham: "+ Eval("SoLuongSP") %>'></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:DataList>
        </td>

    </tr>
    <tr align="center">
        <td>
            <%-- <asp:Literal ID="Literal1" runat="server"></asp:Literal>--%>
            <%--<asp:Literal ID="ltPhanTrang" runat="server"></asp:Literal>--%>
            <div>
<CC1:COLLECTIONPAGERid="CollectionPager1"runat="server">
CC1:COLLECTIONPAGER>
div>
            <cc1:CollectionPager ID="CollectionPager1" runat="server" BackText="« Trước" 
                    FirstText="Đầu" LabelText="Trang:" LastText="Cuối" NextText="Sau »" 
                    ResultsFormat="Kết quả từ {0}-{1} (của {2}) bài viết" ShowFirstLast="True" 
                    SliderSize="10" PagingMode="PostBack" BackNextDisplay="Buttons" 
                    BackNextLinkSeparator="·" HideOnSinglePage="True" IgnoreQueryString="False" 
                    PageNumbersDisplay="Numbers" PageSize="10" ResultsLocation="Top" 
                    SectionPadding="10" ShowLabel="True" ShowPageNumbers="True" UseSlider="True" 
                        BackNextLocation="Split" LabelStyle="" ControlStyle="color:white" 
                        PageNumbersStyle="color:orange" PageNumberStyle=""></cc1:CollectionPager>
           
        </td>
    </tr>
</table>



